//添加文章
const db=require("../lib/db")
function addAriticle(title,content,des,author,authorId,classify,time){
    return new Promise((resolve,reject)=>{
        let sql=`insert into article(title,content,des,author,authorId,classify,time) values('${title}','${content}','${des}','${author}','${authorId}','${classify}','${time}')`
       
        db.querysql(sql).then(data=>{
            if(data.length==0){
                resolve(404)
            }else{
               resolve(true)
            }
        })
    })
}
module.exports=addAriticle